<!-- Sign in form The Photo Album Team
!-->

<!-- layout inherited from base.html -->
{% extends "base.html" %}

<!-- title and extra headers -->
{% block title %} PhotoAlbum -- Sign in {% endblock %}

<!-- main content -->
{% block main_content %}
    {% block login_form %}
        <h1>Sign in</h1>

        <!-- in case of sign-in failed -->
        {% if login_failed %}
            <div class="error">Username or password incorrect</div>
        {% endif %}

        <!-- welcome to newly registered user -->
        {% if registered %}
            <p>Welcome to Photo Album service!</p>
        {% endif %}
{% endblock %}
        <!-- sign-in form -->
        <form method="post" id="signin_form" action="/signin">
        {% csrf_token %}
        <table>
        <tr>
            <td>
	        <label for="user">Username:</label>
            </td>
            <td>
			{{ login_form.username }}
            </td>
        </tr>
        <tr>
            <td>
	        <label for="pass">Password:</label>
            </td>
            <td>
			{{ login_form.password }}
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <input class="button" type="submit" id="submit" name="submit" value="Sign in" />
            </td>
        </tr>
        </table>
        </form>

    {% endblock %}
